shell script or command to search and replace [closed]

Posted by Redbox on Server Fault See other posts from Server Fault or by Redbox
Published on 2012-12-01T08:55:20Z Indexed on 2012/12/01 11:08 UTC
Read the original article Hit count: 130

Filed under:
|
|

Possible Duplicate:
My server’s been hacked EMERGENCY

lately website on my server has been infected with nasty javascript like this:

http://pastebin.com/7XCidF6C

i wonder is there any where to search and remove the entire script block?

i only know how to search which files:

find /home/loudcom/public_html/tv -iname '.' | xargs grep --color 'f1930e\|fff309'

how do i apply sed or any other command to replace the entire block of nasty code to empty? im using Centos 6.

© Server Fault or respective owner

Related posts about search

Related posts about sed